const translate = require("./translate");
const fs = require("fs");

const args = process.argv;

for (let arg of args) {
    if (arg.endsWith(".json")) {
        let json = fs.readFileSync(arg).toString();
        translate.translate(JSON.parse(json)).then(res => {
            console.log(JSON.stringify(res, null, 4));
        });
    }
}